package com.bosssoft.cart.service;

import com.bosssoft.cart.pojo.ShopCart;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;
import java.util.List;


public interface ShopCartService {

    /**
     * 获取购物车列表
     * @return 购物车
     */
    List<ShopCart> queryCartList();

    /**
     * 根据id从购物车移除商品
     * @param bookID 商品id
     */

    void removeFromCart(@Param("bookID") int bookID,HttpSession session);
    /**
     * 根据id将商品添加进购物车
     * @param bookID 商品id
     */

    void addIntoCart(@Param("bookID") int bookID,HttpSession session);

    /**
     * 根据id将商品添加进购物车
     * @param id 商品id
     */
    ShopCart queryShopByShopID(@Param("bookID") int id);
}
